try:
    import ttk
except ImportError:
    import tkinter.ttk as ttk
try:
    import Tkinter as tk  # Python 2
except ImportError:
    import tkinter as tk  # Python 3


root = tk.Tk()

tree = ttk.Treeview(root)

tree["columns"] = ("one", "two")

tree.column("one", width=100)
tree.column("two", width=100)
tree.heading("#0", text="column Name")
tree.heading("one", text="column A")
tree.heading("two", text="column B")

tree.insert("", 'end', text="Line 1", values=("1A", "1b"))
tree.insert("", 'end', text="Line 2", values=("2A", "2b"))
'''
id2 = tree.insert("", 1, "dir2", text="Dir 2")
tree.insert(id2, "end", "dir 2", text="sub dir 2", values=("S1A", "S1B"))

##alternatively:

tree.insert("", 3, "dir3", text="Dir 3")
tree.insert("dir3", 3, text=" sub dir 3", values=("S2A", "S2B"))
'''
tree.pack()
# print(tree.column())
root.mainloop()